<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>视频列表</title>
    
    <!-- 2-1.导入css -->
    
    <link rel="stylesheet" href="../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../layuiadmin/style/admin.css" media="all">
</head>
<body>
	<div id="headerpage" style="width:100%;height:154px;">
	<!--这个div是为了引入header.html头部-->
    </div> 
    
    <table class="layui-hide" id="test-table-operate" lay-filter="test-table-operate"></table>
    <script type="text/html" id="test-table-operate-barDemo">
        <div>
			<video src="/file/video/{{d.vidpath}}" controls="controls" width="200px" heigt="200px" controlslist="nodownload"></video>
			<p><a class="layui-btn layui-btn-primary layui-btn-xs" href="/video/getVideoDetail?vidid={{d.vidid}}">{{d.vidname}}</a></p>
		</div>
    </script>
    
    <iframe id="footerWrap"  width="100%" height="80px"  scrolling="no" frameborder="0"  src="/footer" noresize="noresize" /></iframe>
</body>

<!-- 2-2.导入js -->

<script src="../layuiadmin/layui/layui.js"></script>  
<script>
  
  layui.config({
    base: '../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form','table', 'laydate'], function(){
    var table = layui.table
    ,form = layui.form
    ,$ = layui.$
    ,admin = layui.admin;
    $("#headerpage").load("/header");
    table.render({
        id:'filid'
       ,elem: '#test-table-operate'
       ,url: '/video/queryAllVideos'
       ,page: true
       ,limit:10
       ,toolbar: '#test-table-toolbar-toolbarDemo'
       ,height: 550
       ,cols: [[
         {align:'center', title:'',toolbar: '#test-table-operate-barDemo', width:180}
       ]]
     
     });
     //监听表格复选框选择
     table.on('checkbox(test-table-operate)', function(obj){
       console.log(obj);
     });
     
  });
  </script>
</html>